package util;

import java.util.ArrayList;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

public class FieldErrorParser {

	public static String parse(HttpServletRequest request, String name){
		Map map = (Map)request.getAttribute("fieldErrors");
		System.out.println(map.size());
	  	ArrayList<String> list= new ArrayList<String>();
	  	String s = new String("");
	  	if(map.containsValue(name)){
	  		System.out.println("a");
	  		list =(ArrayList<String>) map.get(name);
	  		s = list.get(0);
	  	}
	  	return s;
	}
}
